<?php

declare(strict_types=1);

namespace Zms\AdminElementPlus\FormCreate\FormItem;

/**
 * 颜色选择框
 * Class Checkbox
 */
class Map extends FormItemAbstract
{
    protected string $_type = 'choice-map';

    /**
     * 获取值类型
     * @return string
     */
    public function valueType(): string
    {
        return self::VALUE_TYPE_ARRAY;
    }

    /**
     * Radio constructor.
     * @param string $field
     * @param string $title
     * @param array $value
     */
    public function __construct(string $field, string $title, array $value = ['lng' => '', 'lat' => ''])
    {
        $this->_title = $title;
        $this->_field = $field;
        $this->_value = $value;
        $this->clearable(false);
    }


    /**
     * 地图KEY
     * @param string $mapKey
     * @return Map
     */
    public function mapKey(string $mapKey): Map
    {
        return $this->props('map-key', $mapKey);
    }


    /**
     * 容器宽度
     * @param string $width
     * @return Map
     */
    public function width(string $width): Map
    {
        return $this->props('width', $width);
    }



    /**
     * 容器宽度
     * @param string $height
     * @return Map
     */
    public function height(string $height): Map
    {
        return $this->props('height', $height);
    }
}